# /**
# * Copyright (c) 2022 Beijing Jiaotong University
# * photlab is licensed under [Open Source License].
# * You can use this software according to the terms and conditions of the [Open Source License].
# *
# * You may obtain a copy of [Open Source License] at: [https://open.source.license/]
# *
# * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
# * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
# * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
# *
# * See the [Open Source License] for more details.
# */
# /**
# * Author: Shihao Xie
# * Created: Jul. 8, 2022
# * Supported by: National Key Research and Development Program of China
# */

include "common_data_type.thrift"
include "file_data_type.thrift"
include "library_data_type.thrift"
include "project_data_type.thrift"
include "device_data_type.thrift"
# thrift --gen py ./interface/library_service.thrift
# interface count = 8
namespace py phot_server.rpc.library_service
namespace js photlab.library_service

service Library{
    list<file_data_type.PhotFile> get_library_list(1:string relative_path="./") throws (1:common_data_type.PhotError error)

    library_data_type.PhotComponentPrototype get_component_prototype(1:string relative_path) throws (1:common_data_type.PhotError error)

    void save_component_prototype(1:string relative_path, 2:library_data_type.PhotComponentPrototype component) throws (1:common_data_type.PhotError error)

    void delete_component_prototype(1:string path) throws (1:common_data_type.PhotError error)

    list<library_data_type.PhotComponentPrototype> search_component(1:string query_string) throws (1:common_data_type.PhotError error)

    list<project_data_type.ProjectConfig> get_sample_list(1:string relative_path="./") throws (1:common_data_type.PhotError error)

    list<device_data_type.PhotMaterial> get_material_list() throws (1:common_data_type.PhotError error)

    list<string> get_icon_list() throws (1:common_data_type.PhotError error)
}